package com.qd.panda.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 用户订单
 *
 * @author sjk
 */
@Getter
@Setter
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@TableName("panda_user_stroke_order")
public class UserStrokeOrder extends Model<UserStrokeOrder> implements Serializable {

    private static final long serialVersionUID = 1L;
    /**
     * 主键
     */
    @TableId(value = "order_id", type = IdType.ASSIGN_ID)
    private String orderId;
    /**
     * 开始时间
     */
    @TableField("start_time")
    private LocalDateTime startTime;
    /**
     * 结束时间
     */
    @TableField("end_time")
    private LocalDateTime endTime;
    /**
     * 用户昵称
     */
    @TableField("nick_name")
    private String nickName;
    /**
     * 订单金额
     */
    @TableField("order_amount")
    private BigDecimal orderAmount;
    /**
     * 实际支付金额
     */
    @TableField("pay_amount")
    private BigDecimal payAmount;
    /**
     * 线上支付金额
     */
    @TableField("on_line_pay_amount")
    private BigDecimal onLinePayAmount;
    /**
     * 优惠金额
     */
    @TableField("discount_amount")
    private BigDecimal discountAmount;
    /**
     * 服务费
     */
    @TableField("service_charge")
    private BigDecimal serviceCharge;
    /**
     * 闸机编号
     */
    @TableField("machine_code")
    private String machineCode;
    /**
     * 支付状态:0未支付 1支付成功 2支付失败
     */
    @TableField("pay_status")
    private Integer payStatus;
    /**
     * 订单类型:0预约订单 1停车缴费订单 2超时补缴费订单
     */
    @TableField("order_type")
    private Integer orderType;
    /**
     * 行程ID
     */
    @TableField("sid")
    private String sid;
    /**
     * 停车场
     */
    @TableField("park_id")
    private String parkId;
    /**
     * 车牌
     */
    @TableField("plate_number")
    private String plateNumber;
    /**
     * 用户ID
     */
    @TableField("user_id")
    private String userId;
    /**
     * 行程类型:0停车1充电
     */
    @TableField("trip_type")
    private Integer tripType;
    /**
     * 业务ID:对应订单表中的第三方订单号
     */
    @TableField("bid")
    private String bid;
    /**
     * 是否ETC支付
     */
    @TableField("etc_pay")
    private String etcPay;
    /**
     * 第三方订单ID
     */
    @TableField("third_party_order_id")
    private String thirdPartyOrderId;
    /**
     * 扩展字段
     */
    @TableField("extends_files")
    private String extendsFiles;
    /**
     * 停车场名称
     */
    @TableField("park_name")
    private String parkName;
    /**
     * 推广码
     */
    @TableField("promotion_code")
    private String promotionCode;

    public void freeData() {
        this.orderId = null;
        this.startTime = null;
        this.endTime = null;
        this.nickName = null;
        this.orderAmount = null;
        this.payAmount = null;
        this.onLinePayAmount = null;
        this.discountAmount = null;
        this.serviceCharge = null;
        this.machineCode = null;
        this.payStatus = null;
        this.orderType = null;
        this.sid = null;
        this.parkId = null;
        this.plateNumber = null;
        this.userId = null;
        this.tripType = null;
        this.bid = null;
        this.etcPay = null;
        this.thirdPartyOrderId = null;
        this.extendsFiles = null;
        this.parkName = null;
        this.promotionCode = null;
    }

}
